<?php

/*
 * @author Ebrain Cedeno <ebraincedeno@gmail.com>
 */

class TTextView extends TWidget{
    
    public $Cols;
    public $Disabled;
    public $MaxLength;
    public $Rows;
    public $Text;
    
    public function __construct() {
        parent::__construct(__CLASS__);
    }
    
    public function show(){
        
        if (!array_key_exists('style', $this->OptionsAditional)){
            $this->OptionsAditional['style'] = array('width:'.$this->Width.'px','height:'.$this->Height.'px');
        }
        else{
            $this->OptionsAditional['style'][] = 'width:'.$this->Width.'px';
            $this->OptionsAditional['style'][] = 'height:'.$this->Height.'px';
        }
        
        if ($this->Visible == true){
            return '<textarea name="'.$this->Name.'" id="'.$this->Id.'" cols="'.$this->Cols.'" rows="'.$this->Rows.'" '.$this->getOptionsAditional().'>'.$this->Text.'</textarea>';
        }
        else{
            return '';
        }
        
    }
    
}

?>
